package com.example.pwj.ffstudy.ui.zhihu.model;

import com.blankj.utilcode.util.LogUtils;
import com.example.pwj.ffstudy.bean.zdaily.ZDailyNews;
import com.example.pwj.ffstudy.http.Api;
import com.example.pwj.ffstudy.ui.zhihu.contract.ZNewsContract;
import com.example.pwj.ffstudy.util.DateUtil;

import javax.inject.Inject;

import io.reactivex.Observable;

/**
 * Created by pwj on 2017/8/23.
 */

public class ZNewsModel implements ZNewsContract.Model {
    @Inject
    ZNewsModel() {
        LogUtils.e("ZNewsModel");
    }

    @Override
    public Observable<ZDailyNews> getZDailyNews(int dateCount) {
        return Api.getDefault(Api.TYPE_ZHIHU).getZDailyNews(DateUtil.getFormerDate(dateCount));
    }
}
